<template>
  <div id="index">
    <baidu-map class="map" :center="center" :zoom="zoom" @ready="handler"/>
  </div>
</template>

<script>
export default {
  name: 'BaiDuMap',
  components: {},
  data() {
    return {
      center: {lng: 0, lat: 0},
      zoom: 0
    }
  },
  methods: {
    handler({BMap, map}) {
      console.log(BMap, map)
      this.center.lng = 116.404
      this.center.lat = 39.915
      this.zoom = 15
    }
  }
}
</script>

<style scoped>
.map {
  width: 1560px;
  height: 800px;
}
</style>
